﻿using System;
using System.Web.UI;


namespace mojoPortal.Web.RS.SBM
{
    public partial class RSManageCall : RSBasePage
    {
        int _companyId = 0;
        int _callId = 0;

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["callid"] != null)
                _callId = Convert.ToInt32(Request.QueryString["callid"].ToString());

            if (!Page.IsPostBack)
            {
                InitializeReadyServicePage();
                RSUserIdentity userIdentity = GetRSUserIdentity();
                _companyId = userIdentity.RSCompanyId;

                if (_companyId > 0)
                {
                    if (Request.QueryString["action"] == "add")
                        SetRSPageHeader("Add Service Call");
                    if (Request.QueryString["action"] == "edit")
                        SetRSPageHeader("Edit Service Call");

                    ucCallDetailControl.LoadCallDataByID(_companyId, _callId);
                }
            }
        }
    }
}